package com.zyz.F_异常;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

/**
 * @author: vick
 * @Date: 2025/3/18
 * @Description:
 * @version: 1.0
 */
public class Demo4 {
    public static void main(String[] args) {
        try {
            //编译型异常，需要强制处理
            FileInputStream fileInputStream = new FileInputStream(new File("aa"));
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        }

        //运行时异常，不需要强制处理
        int i = new Integer("11");
    }
}
